Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/jrpc log limit #2572

Merged
merged 16 commits into from
Oct 5, 2023
Merged

Feature/jrpc log limit #2572

merged 16 commits into from
Oct 5, 2023

Conversation

tclemos
Copy link
Contributor

@tclemos tclemos commented Sep 20, 2023

Closes #2502.

What does this PR do?

Add limits when creating new filters or getting logs from state.
New configurations were created to allow the limits to be defined by the node, but not configuration changes are required if the default values are enough for your use case.

MaxLogsCount is a configuration to set the maximum number of logs that can be returned
in a single call to the state, if zero it means no limit

MaxLogsBlockRange is a configuration to set the max range for block number when querying TXs
logs in a single call to the state, if zero it means no limit

Default Values:

[RPC]
MaxLogsCount = 10000
MaxLogsBlockRange = 10000

Reviewers

@ToniRamirezM
@Psykepro

@tclemos tclemos added the config label Sep 20, 2023
@tclemos tclemos added this to the v0.4.0 milestone Sep 20, 2023
@tclemos tclemos self-assigned this Sep 20, 2023
@cla-bot cla-bot bot added the cla-signed label Sep 20, 2023
Copy link
Contributor

@Psykepro Psykepro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just fix the conflicts

db/migrations/state/0010.sql Outdated Show resolved Hide resolved
@tclemos tclemos merged commit dfa0a23 into develop Oct 5, 2023
18 checks passed
@tclemos tclemos deleted the feature/jrpc-log-limit branch October 5, 2023 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

review and add limits to eth_getLogs and eth_newFilter
3 participants